package com.requiem.hist_group_manage_springboot.mapper;

import com.requiem.hist_group_manage_springboot.model.DataModel;
import com.requiem.hist_group_manage_springboot.model.GroupModel;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface DataMapper {

    List<DataModel> getList();

    List<DataModel> getByID(String department);

    LocalDateTime getExpiresByID(Integer studentId);

    //增
    int edit(DataModel dataModel);

    //增
    int add(DataModel dataModel);

    int countStudent();

    int countTeacher();

    int countGroup();

    int countLog();

    List<GroupModel> getHotGroup();

    List<GroupModel> getNumberGroup();

    List<GroupModel> getLogGroup();

    @MapKey("sex")
    List<Map<String, Object>> getSexCount();

    @MapKey("grade")
    List<Map<String, Object>> getGradeCount();

}
